 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%Macros to place text correctly on a4 paper.
 \oddsidemargin=-0.54cm
 \evensidemargin=-0.54cm
 \textwidth=17cm
 \topmargin=0pt
 \headheight=0pt
 \textheight=23cm
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %Restore TeX's \line command as \texline.
 \def\texline{\hbox to\hsize}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Headings without numbers -- ownheadings page style.
 \def\ps@ownheadings{\let\@mkboth\@gobbletwo
 \def\@oddhead{\rightmark}
 \def\@oddfoot{}
 \def\@evenhead{\leftmark}
 \def\@evenfoot{}
 \def\sectionmark##1{}
 \def\subsectionmark##1{}
 \def\threeparthead##1##2##3##4{\markright{##4 \threepart{##1}{##2}{##3}}}}

 % Three part headings.
 \newcommand{\threeparteqsp}[4]{#4\texline{#1\hfil #2\hfil #3}}
 \newcommand{\threepart}[4]{#4
                     \texline{\hskip-0.3cm \texline{#1 \hfil #3}
                              \hskip-\hsize
                              \texline{\hfil #2 \hfil} } }
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % A Simple version for pageheaders which will put a pageheader
 % on the first page if so desired.
 \def\ps@simpleheadings{\let\@mkboth\@gobbletwo
 \def\@oddhead{\simple@header}
 \def\@oddfoot{\simple@footer}
 \def\@evenhead{\@oddhead}
 \def\@evenfoot{\@oddfoot}
 \def\sectionmark##1{}
 \def\subsectionmark##1{}
 \def\threeparthead
           ##1##2##3##4{\global\def\simple@header
                                  {\threepart{##1}{##2}{##3}{##4}}}
 \def\threepartheadeqsp
           ##1##2##3##4{\global\def\simple@header
                                 {\threeparteqsp{##1}{##2}{##3}{##4}}}
 \def\threepartfoot
           ##1##2##3##4{\global\def\simple@footer
                                  {\threepart{##1}{##2}{##3}{##4}}}
 \def\threepartfooteqsp
           ##1##2##3##4{\global\def\simple@footer
                                 {\threeparteqsp{##1}{##2}{##3}{##4}}}
 %% Initialize them to empty, to avoid startup errors.
  \threeparthead{}{}{}{}
  \threepartfoot{}{}{}{}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

